<template>
  <div id="app">
    <!-- radio单选框 在一组备选项中进行单选 -->
    <!-- 要使用 Radio 组件，只需要设置v-model绑定变量，选中意味着变量的值为相应 Radio label属性的值 -->
    <el-radio-group v-model="radio" @change = "handleClick">
      <el-radio label = "1" >选项1</el-radio>
      <el-radio label = "2">选项2</el-radio>
      <el-radio label = "3">选项3</el-radio>
    </el-radio-group>
  </div>
</template>
<script>
export default {
  data () {
    return {
      radio: '2'
    }
  },
  methods: {
    handleClick: function (label) {
      console.log(label)
    }
  }
}
</script>
<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
